package com.bootx.predict.pojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class RedPacketBatch implements Serializable {

    private Long batchId;
    private List<RedPacketDetail> redPackets = new ArrayList<>();

    public Long getBatchId() {
        return batchId;
    }

    public void setBatchId(Long batchId) {
        this.batchId = batchId;
    }

    public List<RedPacketDetail> getRedPackets() {
        return redPackets;
    }

    public void setRedPackets(List<RedPacketDetail> redPackets) {
        this.redPackets = redPackets;
    }

    public static class RedPacketDetail {
        private Integer index;
        private Double amount;
        private Integer openTime;

        public Integer getIndex() {
            return index;
        }

        public void setIndex(Integer index) {
            this.index = index;
        }

        public Double getAmount() {
            if(amount == null){
                amount = 0.0;
            }
            return amount;
        }

        public void setAmount(Double amount) {
            this.amount = amount;
        }

        public Integer getOpenTime() {
            if(openTime == null){
                openTime = 0;
            }
            return openTime;
        }

        public void setOpenTime(Integer openTime) {
            this.openTime = openTime;
        }
    }
}
